package org.chen.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.chen.entity.TtsVoice;

import java.util.List;

@Mapper
public interface TtsVoiceMapper extends BaseMapper<TtsVoice> {
    
    @Select("SELECT v.* FROM tts_voice v " +
            "JOIN tts_model_voice mv ON v.voice_id = mv.voice_id " +
            "WHERE mv.model_id = #{modelId}")
    List<TtsVoice> findVoicesByModelId(@Param("modelId") String modelId);
}